const Koa = require('koa');
const router = require('./router');//路由中间件
const session = require('./session');//存储cookie
const _static = require('./staticServer');//静态文件中间件
const cors = require('./cors');//解决跨域
const gzip = require('./gzip');//压缩
const interceptor = require('./Interceptor');//拦截器
const app = new Koa();
cors(app);
session(app);
_static(app);
app.use(interceptor);
router(app);
gzip(app);
app.listen(8080, () => console.log('the server is running on port 8080'));
